-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
find optimal prefix to allocate to avoid fragmentation #14
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ecbaldwin
commented
May 9, 2024
ecbaldwin
commented
May 9, 2024
ecbaldwin
commented
May 9, 2024
ecbaldwin
commented
May 12, 2024
ecbaldwin
force-pushed
the
avoid-fragmentation
branch
from
May 12, 2024 18:56
e940237
to
96378e9
Compare
ecbaldwin
commented
May 14, 2024
ecbaldwin
force-pushed
the
avoid-fragmentation
branch
3 times, most recently
from
June 6, 2024 04:08
0795118
to
410b20d
Compare
Given two sets, the first one representing the full IP space which can be used, and a second representing what has already been used or allocated, this algorthim can find a best fit prefix that you can add to reserved set which will minimize the fragmentation of the resulting reserved set. This can be used to allocate IP address subnets in the best way possible to avoid situations where a subnet cannot be allocated because the space was not allocated carefully enough. It cannot prevent all fragmentation. Since it has no knowledge of how prefixes may be deallocated in the future, it cannot make decisions to allocate so that deallocations will open up the most contiguous space possible.
It doesn't necessarily need to complete the entire difference operation. It can look for the best prefix while it is performing the diff.
ecbaldwin
force-pushed
the
avoid-fragmentation
branch
2 times, most recently
from
June 7, 2024 04:46
cd9dec0
to
938bba7
Compare
ecbaldwin
force-pushed
the
avoid-fragmentation
branch
from
June 7, 2024 04:51
938bba7
to
fb7755f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Given two sets, the first one representing the full IP space which can be used, and a second representing what has already been used or allocated, this algorthim can find a best fit prefix that you can add to reserved set which will minimize the fragmentation of the resulting reserved set.
This can be used to allocate IP address subnets in the best way possible to avoid situations where a subnet cannot be allocated because the space was not allocated carefully enough.
It cannot prevent all fragmentation. Since it has no knowledge of how prefixes may be deallocated in the future, it cannot make decisions to allocate so that deallocations will open up the most contiguous space possible.